<?php
require_once('configure.php'); 
$query = "SELECT DISTINCT(kecamatan) FROM kodepos 
WHERE kecamatan  LIKE '{$_GET['q']}%' 
AND UPPER(kota) ='".urldecode(strtoupper($_GET['kota']))."'
GROUP BY kecamatan"; 
$res = my_query($query);
 
while( $rw=my_fetch_array($res) ){
	 echo strtoupper ($rw['kecamatan'] )."\n";
}
exit;